﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Workflow.Common.Dao;
using Workflow.IDAO;
using Workflow.Model;
using NHibernate.Linq;

namespace Workflow.DAO
{
	public class PaymentDao : RepositoryBase<Payment>, IPaymentDao
	{
		/// <summary>
		/// payment
		/// </summary>
		/// <returns></returns>
		public IList<Payment> GetPaymentList(string type)
		{
			var result = Session.Query<Payment>();

			result = result.Where(x => x.PaymentType == type);

			result = result.OrderBy(x => x.PaymentOrder);

			return result.ToList();
		}
	}
}
